package com.ytsakura.blog.service;

import com.ytsakura.blog.dao.HistoryRepository;
import com.ytsakura.blog.pojo.History;
import com.ytsakura.blog.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

/**
 * @author YtSakura(Yin Tao)
 * @date 2020/6/5 5:18
 * @describe
 */
@Service
public class HistoryServiceImpl implements HistoryService {

    @Autowired
    private HistoryRepository historyRepository;

    @Override
    public Page<History> findHistoryByUserId(Pageable pageable, User user) {
        return historyRepository.findAllByUserView(pageable,user);
    }

}
